package application.authorization;

import org.apache.wicket.Session;
import org.apache.wicket.authorization.strategies.role.IRoleCheckingStrategy;
import org.apache.wicket.authorization.strategies.role.Roles;


public class UserRolesAuthorizer implements IRoleCheckingStrategy {

    /**
     * Construct.
     */
    public UserRolesAuthorizer() {
    }

    /**
     * @see org.apache.wicket.authorization.strategies.role.IRoleCheckingStrategy#hasAnyRole(Roles)
     */
    public boolean hasAnyRole(Roles roles) {
        RolesSession session = (RolesSession) Session.get();
        return session.getRoles().hasAnyRole(roles);
    }

}